package cn.rxls.community.dto.maintenance;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 维修新增
 */
@Data
public class MaintenanceAddDTO {
    //维修标题
    @NotBlank(message = "标题不为空")
    private String maintenanceTitle;
    //维修地址
    @NotBlank(message = "地址不为空")
    private String maintenanceAddress;
    //上门时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @Future(message = "非法时间")
    private Date maintenanceTime;
    //故障图片
    @NotBlank(message = "故障图片不为空")
    private String maintenanceImg;
    //电话号码
    @NotBlank(message = "电话号码不为空")
    private String maintenancePhone;
    //故障描述
    @NotBlank(message = "故障描述不为空")
    private String maintenanceMsg;
    //备注
    private String remark;
}
